//
//  CarForum_FocusModel.m
//  CarProjectTest
//
//  Created by lanou on 15/10/24.
//  Copyright © 2015年 完美的宇gogo. All rights reserved.
//

#import "CarForum_FocusModel.h"




@implementation CarForum_FocusModel

-(void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqualToString:@"focusPost"])
    {
        // 轮播图数组
        _focusPost = [NSMutableArray array];
        
        for (NSDictionary *dic in value)
        {
            // 轮播图 Model类
            CarForum_FocusPostModel *model = [[CarForum_FocusPostModel alloc]init];
            [model setValuesForKeysWithDictionary:dic];
            [_focusPost addObject:model];
        }
    }
    else if ([key isEqualToString:@"postList"])
    {
        // cell数组
        _postList = [NSMutableArray array];
        
        for (NSDictionary *dic in value)
        {
            // cell Model类
            CarForum_PostModel *model = [[CarForum_PostModel alloc]init];
            [model setValuesForKeysWithDictionary:dic];
        }
    }
    else
    {
        [super setValue:value forKey:key];
    }
}




@end
